#ifndef INC_SYSCALL_H
#define INC_SYSCALL_H

#include <stdint.h>
#include "types.h"
#include "syscallno.h"

int argstr(int, char **);
int argint(int, uint64_t *);
int argptr(int n, char **pp, int size);
int fetchint(uint64_t addr, int64_t *ip);
int fetchstr(uint64_t, char **);

int syscall(int sysnum);

int sys_openat();
int sys_mknodat();
int sys_dup();
ssize_t sys_writev();
int sys_clone();
int sys_wait4();
int sys_close();
ssize_t sys_read();
int sys_fstat();
int sys_fstatat();
int sys_yield();
int sys_chdir();
int sys_mkdirat();
size_t sys_brk();
ssize_t sys_readv();
ssize_t sys_mmap();

#endif